import request from "@/utils/request";

// 根据userid查看我的消息
export let messagesearch = (param) =>
  request.post("/message/search", param, {
    otherapi: true,
  });

// 每日签到
export let signcreateSign = (param) =>
  request.post("/sign/createSign", param, {
    otherapi: true,
  });

// ---- 任务接口 ----

// 创建任务
export let taskcreateTask = (param) =>
  request.post("/task/createTask", param, {
    otherapi: true,
  });

// 查询我创建的任务
export let searchByCreateId = (param) =>
  request.post("/task/searchByCreateId", param, {
    otherapi: true,
  });

// 任务详情页
export let searchByTaskId = (param) =>
  request.post("/task/searchByTaskId", param, {
    otherapi: true,
  });

// 查询我参与的任务
export let searchByUserId = (param) =>
  request.post("/task/searchByUserId", param, {
    otherapi: true,
  });

// 查询任务列表，不需要传值
export let tasksearchTask = (param) =>
  request.post("/task/searchTask", param, {
    otherapi: true,
  });

// 更新状态
export let updateStatus = (param) =>
  request.post("/task/updateStatus", param, {
    otherapi: true,
  });

// ---- 登录、注册 ----

// 登录
export let userlogin = (param) =>
  request.post("/user/login", param, {
    otherapi: true,
  });

// 注册
export let useregister = (param) =>
  request.post("/user/register", param, {
    otherapi: true,
  });

// 查询我的相关信息-我的页面相关信息
export let usersearchMine = (param) =>
  request.post("/user/searchMine", param, {
    otherapi: true,
  });

// 创建活动vote
export let createdVote = (param) =>
  request.post("/vote/createdVote", param, {
    otherapi: true,
  });
